﻿using Framework.GamePool.@interface;
using Framework.GamePool.manager;
using UnityEngine;

namespace Framework.GamePool.@abstract
{
    public abstract class GamePoolAbstract : MonoBehaviour, GamePoolInterface
    {

        public string Table { get; internal set; }

        public string Group { get; internal set; }

        protected bool isDisable;

        public bool IsDisable() { return this.isDisable; }

        public virtual void Pool_Init() { }

        public virtual void Pool_Disable()
        {
            this.isDisable = true;
            this.gameObject.transform.SetParent(GamePoolManager.Instance.transform);
            this.gameObject.SetActive(false);
        }

        public virtual void Pool_Enable()
        {
            this.isDisable = false;
            this.gameObject.SetActive(true);
        }

    }
}